<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <Script>
        /*常用数学常量*/
        console.log(Math.PI);//圆周率
        console.log(Math.E);//欧拉常数e
        console.log(Math.LN2);//以2为底自然对数
        console.log(Math.LN10);//以10为底自然对数
        console.log(Math.SQRT1_2);//二分之一的平方根
        console.log(Math.SQRT2);//2的平方根
        
        /*常用方法*/
        console.log(Math.abs(-2));//返回绝对值
        console.log(Math.floor(2.3));//向下取整
        console.log(Math.ceil(2.3));//向上取整
        console.log(Math.round(3.6));//四舍五入
        console.log(Math.min(1,99,3));//求最小值
        console.log(Math.max(1,99,3));//求最大值
        console.log(Math.random());//0-1左闭右开随机数，通过运算符可以扩大其随机数范围
    </Script>
</body>
</html>